Support Days=0 lifecycle expiration: bump arsenal and add functional tests#6192
Support Days=0 lifecycle expiration: bump arsenal and add functional tests#6192delthas wants to merge 5 commits into
Conversation
Hello delthas,My role is to assist you with the merge of this Available options
Available commands
Status report is not available. |
Request integration branchesWaiting for integration branch creation to be requested by the user. To request integration branches, please comment on this pull request with the following command: Alternatively, the |
| "@hapi/joi": "^17.1.1", | ||
| "@smithy/node-http-handler": "^3.0.0", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#8.4.4", | ||
| "arsenal": "git+https://github.com/scality/Arsenal#f5d43abeb8139ec8835ef0354888ff13ddb14d8b", |
There was a problem hiding this comment.
Arsenal is pinned to a commit hash, not a released tag. The PR description acknowledges this, but flagging per policy: git-based deps must pin to a tag before merge.
— Claude Code
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 2 files with indirect coverage changes @@ Coverage Diff @@
## development/9.3 #6192 +/- ##
===================================================
- Coverage 84.64% 84.57% -0.07%
===================================================
Files 206 206
Lines 13356 13352 -4
===================================================
- Hits 11305 11293 -12
- Misses 2051 2059 +8
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
f6b1245 to
a934286
Compare
a934286 to
c7099f8
Compare
|
DarkIsDude
left a comment
There was a problem hiding this comment.
@delthas CI is broken
Yes thats due to scality/Arsenal#2651 #6198 Reviews welcome :D |
c7099f8 to
d6ba793
Compare
c48a240 to
b97e579
Compare
Pure formatting pass (no logic change) on the functional test file and the bucketPutLifecycle API handler touched by the Days=0 work, so the prettier CI check (which runs on whole files modified by the PR) passes. Isolating the reformat keeps the functional commits reviewable. Issue: CLDSRV-928
The arsenal LifecycleConfiguration constructor now takes a werelogs logger as its second argument and logs when a rule is configured with a 0-day action time. Pass the request logger so that audit line is correlated to the request. Issue: CLDSRV-928
Cover the new Days=0 ("empty this bucket") capability in PutBucketLifecycle:
- Expiration Days=0 accepted and round-trips via GetBucketLifecycle
- NoncurrentVersionExpiration NoncurrentDays=0 accepted
- AbortIncompleteMultipartUpload DaysAfterInitiation=0 accepted
- negative Expiration Days rejected (must be nonnegative)
- Expiration Days exceeding MAX_DAYS rejected (MalformedXML)
These pass once the arsenal dependency is bumped to the version including
ARSN-597.
Issue: CLDSRV-928
Point arsenal at the ARSN-597 commit (7d3bb94f69d31f72b9b5c73e3ccfc6f75d938b30) rather than a released tag, since the version is not cut yet. ARSN-597 is rebased onto 8.4.11 (the multi-dest CRR revert), so this delivers Days=0 support (the explicit "empty this bucket" lifecycle signal) plus the 0-day audit logging the previous commit wires up, without reintroducing CRR, and makes the functional tests added earlier pass. To amend once ARSN-597 is released: replace the commit pin with the released arsenal version (>= 8.4.12) and re-run yarn install. Issue: CLDSRV-928
CodeQL's "Callback-style function (async migration)" query flags the waterfall step callbacks in this handler once it is modified by the PR. Convert the handler to async/await, promisifying the callback-based helpers (parseXML, standardMetadataValidateBucket, metadata.updateBucket), following the established pattern in bucketGet / objectGetLegalHold: a thin callback wrapper delegates to the async implementation and forwards CORS headers via err.additionalResHeaders on error. Issue: CLDSRV-928
b97e579 to
d40b90d
Compare
What
CloudServer side of the
Days = 0lifecycle support. Two commits:tests/functional/aws-node-sdk/test/bucket/putBucketLifecycle.js):ExpirationDays: 0accepted and round-trips via GetBucketLifecycleNoncurrentVersionExpirationNoncurrentDays: 0andAbortIncompleteMultipartUploadDaysAfterInitiation: 0acceptedExpirationDaysrejected (must be nonnegative) and> MAX_DAYSrejected (MalformedXML)Why
Days = 0is an explicit "empty this bucket" lifecycle signal. Because it was rejected everywhere until now, it is unambiguous (unlikeDays = 1, used by legitimate short-retention buckets) and lets backbeat (BB-779) skip building costly lifecycle indexes for buckets being drained. CloudServer delegates all lifecycle validation to arsenal, so the only changes here are the dependency bump and the tests.The arsenal dependency is pinned to the ARSN-597 commit
f5d43abeb8139ec8835ef0354888ff13ddb14d8b(arsenal PR scality/Arsenal#2648), not a released tag, because the version is not cut yet. Before merge: amend the bump to the released arsenal version (>= 8.4.8) and re-runyarn install. Draft until then.Related
Issue: CLDSRV-928